<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 8.5.2" />
<title>Gerrit Code Review - Searching Changes</title>
<style type="text/css">
/* Debug borders */
p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
/*
  border: 1px solid red;
*/
}

body {
  margin: 1em 5% 1em 5%;
}

a {
  color: blue;
  text-decoration: underline;
}
a:visited {
  color: fuchsia;
}

em {
  font-style: italic;
  color: navy;
}

strong {
  font-weight: bold;
  color: #083194;
}

tt {
  color: navy;
}

h1, h2, h3, h4, h5, h6 {
  color: #527bbd;
  font-family: sans-serif;
  margin-top: 1.2em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

h1, h2, h3 {
  border-bottom: 2px solid silver;
}
h2 {
  padding-top: 0.5em;
}
h3 {
  float: left;
}
h3 + * {
  clear: left;
}

div.sectionbody {
  font-family: serif;
  margin-left: 0;
}

hr {
  border: 1px solid silver;
}

p {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

ul, ol, li > p {
  margin-top: 0;
}

pre {
  padding: 0;
  margin: 0;
}

span#author {
  color: #527bbd;
  font-family: sans-serif;
  font-weight: bold;
  font-size: 1.1em;
}
span#email {
}
span#revnumber, span#revdate, span#revremark {
  font-family: sans-serif;
}

div#footer {
  font-family: sans-serif;
  font-size: small;
  border-top: 2px solid silver;
  padding-top: 0.5em;
  margin-top: 4.0em;
}
div#footer-text {
  float: left;
  padding-bottom: 0.5em;
}
div#footer-badges {
  float: right;
  padding-bottom: 0.5em;
}

div#preamble {
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}
div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
div.admonitionblock {
  margin-top: 1.0em;
  margin-bottom: 1.5em;
}
div.admonitionblock {
  margin-top: 2.0em;
  margin-bottom: 2.0em;
  margin-right: 10%;
  color: #606060;
}

div.content { /* Block element content. */
  padding: 0;
}

/* Block element titles. */
div.title, caption.title {
  color: #527bbd;
  font-family: sans-serif;
  font-weight: bold;
  text-align: left;
  margin-top: 1.0em;
  margin-bottom: 0.5em;
}
div.title + * {
  margin-top: 0;
}

td div.title:first-child {
  margin-top: 0.0em;
}
div.content div.title:first-child {
  margin-top: 0.0em;
}
div.content + div.title {
  margin-top: 0.0em;
}

div.sidebarblock > div.content {
  background: #ffffee;
  border: 1px solid silver;
  padding: 0.5em;
}

div.listingblock > div.content {
  border: 1px solid silver;
  background: #f4f4f4;
  padding: 0.5em;
}

div.quoteblock, div.verseblock {
  padding-left: 1.0em;
  margin-left: 1.0em;
  margin-right: 10%;
  border-left: 5px solid #dddddd;
  color: #777777;
}

div.quoteblock > div.attribution {
  padding-top: 0.5em;
  text-align: right;
}

div.verseblock > div.content {
  white-space: pre;
}
div.verseblock > div.attribution {
  padding-top: 0.75em;
  text-align: left;
}
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
div.verseblock + div.attribution {
  text-align: left;
}

div.admonitionblock .icon {
  vertical-align: top;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: underline;
  color: #527bbd;
  padding-right: 0.5em;
}
div.admonitionblock td.content {
  padding-left: 0.5em;
  border-left: 3px solid #dddddd;
}

div.exampleblock > div.content {
  border-left: 3px solid #dddddd;
  padding-left: 0.5em;
}

div.imageblock div.content { padding-left: 0; }
span.image img { border-style: none; }
a.image:visited { color: white; }

dl {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}
dt {
  margin-top: 0.5em;
  margin-bottom: 0;
  font-style: normal;
  color: navy;
}
dd > *:first-child {
  margin-top: 0.1em;
}

ul, ol {
    list-style-position: outside;
}
ol.arabic {
  list-style-type: decimal;
}
ol.loweralpha {
  list-style-type: lower-alpha;
}
ol.upperalpha {
  list-style-type: upper-alpha;
}
ol.lowerroman {
  list-style-type: lower-roman;
}
ol.upperroman {
  list-style-type: upper-roman;
}

div.compact ul, div.compact ol,
div.compact p, div.compact p,
div.compact div, div.compact div {
  margin-top: 0.1em;
  margin-bottom: 0.1em;
}

div.tableblock > table {
  border: 3px solid #527bbd;
}
thead, p.table.header {
  font-family: sans-serif;
  font-weight: bold;
}
tfoot {
  font-weight: bold;
}
td > div.verse {
  white-space: pre;
}
p.table {
  margin-top: 0;
}
/* Because the table frame attribute is overriden by CSS in most browsers. */
div.tableblock > table[frame="void"] {
  border-style: none;
}
div.tableblock > table[frame="hsides"] {
  border-left-style: none;
  border-right-style: none;
}
div.tableblock > table[frame="vsides"] {
  border-top-style: none;
  border-bottom-style: none;
}


div.hdlist {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}
div.hdlist tr {
  padding-bottom: 15px;
}
dt.hdlist1.strong, td.hdlist1.strong {
  font-weight: bold;
}
td.hdlist1 {
  vertical-align: top;
  font-style: normal;
  padding-right: 0.8em;
  color: navy;
}
td.hdlist2 {
  vertical-align: top;
}
div.hdlist.compact tr {
  margin: 0;
  padding-bottom: 0;
}

.comment {
  background: yellow;
}

.footnote, .footnoteref {
  font-size: 0.8em;
}

span.footnote, span.footnoteref {
  vertical-align: super;
}

#footnotes {
  margin: 20px 0 20px 0;
  padding: 7px 0 0 0;
}

#footnotes div.footnote {
  margin: 0 0 5px 0;
}

#footnotes hr {
  border: none;
  border-top: 1px solid silver;
  height: 1px;
  text-align: left;
  margin-left: 0;
  width: 20%;
  min-width: 100px;
}


@media print {
  div#footer-badges { display: none; }
}

div#toc {
  margin-bottom: 2.5em;
}

div#toctitle {
  color: #527bbd;
  font-family: sans-serif;
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 1.0em;
  margin-bottom: 0.1em;
}

div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
  margin-top: 0;
  margin-bottom: 0;
}
div.toclevel2 {
  margin-left: 2em;
  font-size: 0.9em;
}
div.toclevel3 {
  margin-left: 4em;
  font-size: 0.9em;
}
div.toclevel4 {
  margin-left: 6em;
  font-size: 0.9em;
}
/* Workarounds for IE6's broken and incomplete CSS2. */

div.sidebar-content {
  background: #ffffee;
  border: 1px solid silver;
  padding: 0.5em;
}
div.sidebar-title, div.image-title {
  color: #527bbd;
  font-family: sans-serif;
  font-weight: bold;
  margin-top: 0.0em;
  margin-bottom: 0.5em;
}

div.listingblock div.content {
  border: 1px solid silver;
  background: #f4f4f4;
  padding: 0.5em;
}

div.quoteblock-attribution {
  padding-top: 0.5em;
  text-align: right;
}

div.verseblock-content {
  white-space: pre;
}
div.verseblock-attribution {
  padding-top: 0.75em;
  text-align: left;
}

div.exampleblock-content {
  border-left: 3px solid #dddddd;
  padding-left: 0.5em;
}

/* IE6 sets dynamically generated links as visited. */
div#toc a:visited { color: blue; }
</style>
<script type="text/javascript">
/*<![CDATA[*/
window.onload = function(){asciidoc.footnotes(); asciidoc.toc(2);}
var asciidoc = {  // Namespace.

/////////////////////////////////////////////////////////////////////
// Table Of Contents generator
/////////////////////////////////////////////////////////////////////

/* Author: Mihai Bazon, September 2002
 * http://students.infoiasi.ro/~mishoo
 *
 * Table Of Content generator
 * Version: 0.4
 *
 * Feel free to use this script under the terms of the GNU General Public
 * License, as long as you do not remove or alter this notice.
 */

 /* modified by Troy D. Hanson, September 2006. License: GPL */
 /* modified by Stuart Rackham, 2006, 2009. License: GPL */

// toclevels = 1..4.
toc: function (toclevels) {

  function getText(el) {
    var text = "";
    for (var i = el.firstChild; i != null; i = i.nextSibling) {
      if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
        text += i.data;
      else if (i.firstChild != null)
        text += getText(i);
    }
    return text;
  }

  function TocEntry(el, text, toclevel) {
    this.element = el;
    this.text = text;
    this.toclevel = toclevel;
  }

  function tocEntries(el, toclevels) {
    var result = new Array;
    var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
    // Function that scans the DOM tree for header elements (the DOM2
    // nodeIterator API would be a better technique but not supported by all
    // browsers).
    var iterate = function (el) {
      for (var i = el.firstChild; i != null; i = i.nextSibling) {
        if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
          var mo = re.exec(i.tagName);
          if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
            result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
          }
          iterate(i);
        }
      }
    }
    iterate(el);
    return result;
  }

  var toc = document.getElementById("toc");
  var entries = tocEntries(document.getElementById("content"), toclevels);
  for (var i = 0; i < entries.length; ++i) {
    var entry = entries[i];
    if (entry.element.id == "")
      entry.element.id = "_toc_" + i;
    var a = document.createElement("a");
    a.href = "#" + entry.element.id;
    a.appendChild(document.createTextNode(entry.text));
    var div = document.createElement("div");
    div.appendChild(a);
    div.className = "toclevel" + entry.toclevel;
    toc.appendChild(div);
  }
  if (entries.length == 0)
    toc.parentNode.removeChild(toc);
},


/////////////////////////////////////////////////////////////////////
// Footnotes generator
/////////////////////////////////////////////////////////////////////

/* Based on footnote generation code from:
 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
 */

footnotes: function () {
  var cont = document.getElementById("content");
  var noteholder = document.getElementById("footnotes");
  var spans = cont.getElementsByTagName("span");
  var refs = {};
  var n = 0;
  for (i=0; i<spans.length; i++) {
    if (spans[i].className == "footnote") {
      n++;
      // Use [\s\S] in place of . so multi-line matches work.
      // Because JavaScript has no s (dotall) regex flag.
      note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
      noteholder.innerHTML +=
        "<div class='footnote' id='_footnote_" + n + "'>" +
        "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
        n + "</a>. " + note + "</div>";
      spans[i].innerHTML =
        "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
        "' title='View footnote' class='footnote'>" + n + "</a>]";
      var id =spans[i].getAttribute("id");
      if (id != null) refs["#"+id] = n;
    }
  }
  if (n == 0)
    noteholder.parentNode.removeChild(noteholder);
  else {
    // Process footnoterefs.
    for (i=0; i<spans.length; i++) {
      if (spans[i].className == "footnoteref") {
        var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
        href = href.match(/#.*/)[0];  // Because IE return full URL.
        n = refs[href];
        spans[i].innerHTML =
          "[<a href='#_footnote_" + n +
          "' title='View footnote' class='footnote'>" + n + "</a>]";
      }
    }
  }
}

}
/*]]>*/
</script>
</head>
<body>
<div id="header">
<h1>Gerrit Code Review - Searching Changes</h1>
<span id="revnumber">version 2.3</span>
<div id="toc">
  <div id="toctitle">Table of Contents</div>
  <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
</div>
</div>
<div id="content">
<h2 id="_default_searches">Default Searches</h2>
<div class="sectionbody">
<div class="paragraph"><p>Most basic searches can be viewed by clicking on a link along the top
menu bar.  The link will prefill the search box with a common search
query, execute it, and present the results.  If exactly one change
matches the search, the change will be presented instead of a list.</p></div>
<div class="tableblock">
<table rules="all"
width="100%"
frame="border"
cellspacing="0" cellpadding="4">
<col width="50%" />
<col width="50%" />
<thead>
<tr>
<th align="left" valign="top">Description          </th>
<th align="left" valign="top"> Default Query</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top"><p class="table">All &gt; Open</p></td>
<td align="left" valign="top"><p class="table">status:open <em>(or is:open)</em></p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">All &gt; Merged</p></td>
<td align="left" valign="top"><p class="table">status:merged</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">All &gt; Abandoned</p></td>
<td align="left" valign="top"><p class="table">status:abandoned</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">My &gt; Dafts</p></td>
<td align="left" valign="top"><p class="table">has:draft</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">My &gt; Watched Changes</p></td>
<td align="left" valign="top"><p class="table">status:open is:watched</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">My &gt; Starred Changes</p></td>
<td align="left" valign="top"><p class="table">is:starred</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">Open changes in Foo</p></td>
<td align="left" valign="top"><p class="table">status:open project:Foo</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<h2 id="_basic_change_search">Basic Change Search</h2>
<div class="sectionbody">
<div class="paragraph"><p>Similar to many popular search engines on the web, just enter some
text and let Gerrit figure out the meaning:</p></div>
<div class="tableblock">
<table rules="all"
width="100%"
frame="border"
cellspacing="0" cellpadding="4">
<col width="50%" />
<col width="50%" />
<thead>
<tr>
<th align="left" valign="top">Description                      </th>
<th align="left" valign="top"> Examples</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top"><p class="table">Legacy numerical id</p></td>
<td align="left" valign="top"><p class="table">15183</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">Full or abbreviated Change-Id</p></td>
<td align="left" valign="top"><p class="table">Ic0ff33</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">Full or abbreviated commit SHA-1</p></td>
<td align="left" valign="top"><p class="table">d81b32ef</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">Email address</p></td>
<td align="left" valign="top"><p class="table"><a href="mailto:user@example.com">user@example.com</a></p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">Approval requirement</p></td>
<td align="left" valign="top"><p class="table">CodeReview&gt;=+2, Verified=1</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<h2 id="_search_operators">Search Operators</h2>
<div class="sectionbody">
<div class="paragraph"><p>Operators act as restrictions on the search.  As more operators
are added to the same query string, they further restrict the
returned results. Search can also be performed by typing only a
text with no operator. It will try to match a project name by
substring.</p></div>
<div class="paragraph"><p>E.g. Searching for just "gerrit is:starred" will try to match a
project name by "gerrit" as substring.</p></div>
<div class="dlist" id="age"><dl>
<dt class="hdlist1">
age:'AGE'
</dt>
<dd>
<div class="paragraph"><p>Amount of time that has expired since the change was last updated
with a review comment or new patch set.  The age must be specified
to include a unit suffix, for example <tt>age:2d</tt>:</p></div>
<div class="ulist"><ul>
<li>
<p>
s, sec, second, seconds
</p>
</li>
<li>
<p>
m, min, minute, minutes
</p>
</li>
<li>
<p>
h, hr, hour, hours
</p>
</li>
<li>
<p>
d, day, days
</p>
</li>
<li>
<p>
w, week, weeks (<tt>1 week</tt> is treated as <tt>7 days</tt>)
</p>
</li>
<li>
<p>
mon, month, months (<tt>1 month</tt> is treated as <tt>30 days</tt>)
</p>
</li>
<li>
<p>
y, year, years (<tt>1 year</tt> is treated as <tt>365 days</tt>)
</p>
</li>
</ul></div>
</dd>
<dt class="hdlist1">
change:'ID'
</dt>
<dd>
<div class="paragraph" id="change"><p>Either a legacy numerical <em>ID</em> such as 15183, or a newer style
Change-Id that was scraped out of the commit message.</p></div>
</dd>
<dt class="hdlist1">
owner:'USER'
</dt>
<dd>
<div class="paragraph" id="owner"><p>Changes originally submitted by <em>USER</em>.</p></div>
</dd>
<dt class="hdlist1">
ownerin:'GROUP'
</dt>
<dd>
<div class="paragraph" id="ownerin"><p>Changes originally submitted by a user in <em>GROUP</em>.</p></div>
</dd>
<dt class="hdlist1">
reviewer:'USER'
</dt>
<dd>
<div class="paragraph" id="reviewer"><p>Changes that have been, or need to be, reviewed by <em>USER</em>.</p></div>
</dd>
<dt class="hdlist1">
reviewerin:'GROUP'
</dt>
<dd>
<div class="paragraph" id="reviewerin"><p>Changes that have been, or need to be, reviewed by a user in <em>GROUP</em>.</p></div>
</dd>
<dt class="hdlist1">
commit:'SHA1'
</dt>
<dd>
<div class="paragraph" id="commit"><p>Changes where <em>SHA1</em> is one of the patch sets of the change.</p></div>
</dd>
<dt class="hdlist1">
project:'PROJECT'
</dt>
<dd>
<div class="paragraph" id="project"><p>Changes occurring in <em>PROJECT</em>. If <em>PROJECT</em> starts with <tt>^</tt> it
matches project names by regular expression.  The
<a href="http://www.brics.dk/automaton/">dk.brics.automaton
library</a> is used for evaluation of such patterns.</p></div>
</dd>
<dt class="hdlist1">
branch:'BRANCH'
</dt>
<dd>
<div class="paragraph" id="branch"><p>Changes for <em>BRANCH</em>.  The branch name is the short name shown
in the web interface, without the traditional <em>refs/heads/</em>
prefix.  This operator is a shorthand for <em>refs:</em>.  Searching for
<em>branch:master</em> really means <em>ref:refs/heads/master</em>, and searching
for <em>branch:refs/heads/master</em> is the same as searching for
<em>ref:refs/heads/refs/heads/master</em>.</p></div>
<div class="paragraph"><p>If <em>BRANCH</em> starts with <tt>^</tt> it matches branch names by regular
expression patterns.  The
<a href="http://www.brics.dk/automaton/">dk.brics.automaton
library</a> is used for evaluation of such patterns.</p></div>
</dd>
<dt class="hdlist1">
topic:'TOPIC'
</dt>
<dd>
<div class="paragraph" id="topic"><p>Changes whose designated topic at upload was <em>TOPIC</em>.  This is
often combined with <em>branch:</em> and <em>project:</em> operators to select
all related changes in a series.</p></div>
<div class="paragraph"><p>If <em>TOPIC</em> starts with <tt>^</tt> it matches topic names by regular
expression patterns.  The
<a href="http://www.brics.dk/automaton/">dk.brics.automaton
library</a> is used for evaluation of such patterns.</p></div>
</dd>
<dt class="hdlist1">
ref:'REF'
</dt>
<dd>
<div class="paragraph" id="ref"><p>Changes where the destination branch is exactly the given <em>REF</em>
name.  Since <em>REF</em> is absolute from the top of the repository it
must start with <em>refs/</em>.</p></div>
<div class="paragraph"><p>If <em>REF</em> starts with <tt>^</tt> it matches reference names by regular
expression patterns.  The
<a href="http://www.brics.dk/automaton/">dk.brics.automaton
library</a> is used for evaluation of such patterns.</p></div>
</dd>
<dt class="hdlist1">
tr:'ID', bug:'ID'
</dt>
<dd>
<div class="paragraph" id="tr"><p>Search for changes whose commit message contains <em>ID</em> and matched
one or more of the
<a href="config-gerrit.html#trackingid">trackingid sections</a>
in the server&#8217;s configuration file.  This is typically used to
search for changes that fix a bug or defect by the issue tracking
system&#8217;s issue identifier.</p></div>
</dd>
<dt class="hdlist1">
label:'VALUE'
</dt>
<dd>
<div class="paragraph" id="label"><p>Matches changes where the approval score <em>VALUE</em> has been set during
a review.  See <a href="#labels">labels</a> below for more detail on the format
of the argument.</p></div>
</dd>
<dt class="hdlist1">
message:'MESSAGE'
</dt>
<dd>
<div class="paragraph" id="message"><p>Changes that matches <em>MESSAGE</em> arbitrary string in body commit messages.</p></div>
</dd>
<dt class="hdlist1">
file:^<em>REGEX</em>
</dt>
<dd>
<div class="paragraph" id="file"><p>Matches any change where REGEX matches a file that was affected
by the change.  The regular expression pattern must start with
<tt>^</tt>.  For example, to match all XML files use <tt>file:^.*\.xml$</tt>.
The <a href="http://www.brics.dk/automaton/">dk.brics.automaton
library</a> is used for the evaluation of such patterns.</p></div>
<div class="paragraph"><p>The <tt>^</tt> required at the beginning of the regular expression not only
denotes a regular expression, but it also has the usual meaning of
anchoring the match to the start of the string.  To match all Java
files, use <tt>file:^.*\.java</tt>.</p></div>
<div class="paragraph"><p>The entire regular expression pattern, including the <tt>^</tt> character,
should be double quoted when using more complex construction (like
ones using a bracket expression). For example, to match all XML
files named like <em>name1.xml</em>, <em>name2.xml</em>, and <em>name3.xml</em> use
<tt>file:"^name[1-3].xml"</tt>.</p></div>
<div class="paragraph"><p>Currently this operator is only available on a watched project
and may not be used in the search bar.</p></div>
</dd>
<dt class="hdlist1">
has:draft
</dt>
<dd>
<div class="paragraph" id="has"><p>True if there is a draft comment saved by the current user.</p></div>
</dd>
<dt class="hdlist1">
has:star
</dt>
<dd>
<div class="paragraph"><p>Same as <em>is:starred</em>, true if the change has been starred by the
current user.</p></div>
</dd>
<dt class="hdlist1">
is:starred
</dt>
<dd>
<div class="paragraph" id="is"><p>Same as <em>has:star</em>, true if the change has been starred by the
current user.</p></div>
</dd>
<dt class="hdlist1">
is:watched
</dt>
<dd>
<div class="paragraph"><p>True if this change matches one of the current user&#8217;s watch filters,
and thus is likely to notify the user when it updates.</p></div>
</dd>
<dt class="hdlist1">
is:reviewed
</dt>
<dd>
<div class="paragraph"><p>True if there is at least one non-zero score on the change, in any
approval category, by any user.</p></div>
</dd>
<dt class="hdlist1">
is:open
</dt>
<dd>
<div class="paragraph"><p>True if the change is other open or submitted, merge pending.</p></div>
</dd>
<dt class="hdlist1">
is:closed
</dt>
<dd>
<div class="paragraph"><p>True if the change is either merged or abandoned.</p></div>
</dd>
<dt class="hdlist1">
is:submitted, is:merged, is:abandoned
</dt>
<dd>
<div class="paragraph"><p>Same as <a href="#status">status:'STATE'</a>.</p></div>
</dd>
<dt class="hdlist1">
status:open
</dt>
<dd>
<div class="paragraph" id="status"><p>True if the change state is other <em>review in progress</em> or <em>submitted,
merge pending</em>.</p></div>
</dd>
<dt class="hdlist1">
status:reviewed
</dt>
<dd>
<div class="paragraph"><p>Same as <em>is:reviewed</em>, matches if there is at least one non-zero
score on the change, in any approval category, by any user.</p></div>
</dd>
<dt class="hdlist1">
status:submitted
</dt>
<dd>
<div class="paragraph"><p>Change has been submitted, but is waiting for a dependency.</p></div>
</dd>
<dt class="hdlist1">
status:closed
</dt>
<dd>
<div class="paragraph"><p>True if the change is either <em>merged</em> or <em>abandoned</em>.</p></div>
</dd>
<dt class="hdlist1">
status:merged
</dt>
<dd>
<div class="paragraph"><p>Change has been merged into the branch.</p></div>
</dd>
<dt class="hdlist1">
status:abandoned
</dt>
<dd>
<div class="paragraph"><p>Change has been abandoned by the change owner, or administrator.</p></div>
</dd>
</dl></div>
</div>
<h2 id="_boolean_operators">Boolean Operators</h2>
<div class="sectionbody">
<div class="paragraph"><p>Unless otherwise specified, operators are joined using the <tt>AND</tt>
boolean operator, thereby restricting the search results.</p></div>
<div class="paragraph"><p>Parentheses can be used to force a particular precendence on complex
operator expressions, otherwise OR has higher precendence than AND.</p></div>
<h3 id="_negation">Negation</h3><div style="clear:left"></div>
<div class="paragraph"><p>Any operator can be negated by prefixing it with <tt>-</tt>, for example
<tt>-is:starred</tt> is the exact opposite of <tt>is:starred</tt> and will
therefore return changes that are <strong>not</strong> starred by the current user.</p></div>
<div class="paragraph"><p>The operator <tt>NOT</tt> (in all caps) is a synonym.</p></div>
<h3 id="_and">AND</h3><div style="clear:left"></div>
<div class="paragraph"><p>The boolean operator <tt>AND</tt> (in all caps) can be used to join two
other operators together.  This results in a restriction of the
results, returning only changes that match both operators.</p></div>
<h3 id="_or">OR</h3><div style="clear:left"></div>
<div class="paragraph"><p>The boolean operator <tt>OR</tt> (in all caps) can be used to find changes
that match either operator.  This increases the nubmer of results
that are returned, as more changes are considered.</p></div>
</div>
<h2 id="labels">Labels</h2>
<div class="sectionbody">
<div class="paragraph"><p>Label operators can be used to match approval score given during
a code review.  The specific set of supported labels depends on
the server configuration, however <tt>CodeReview</tt> and <tt>Verified</tt>
are the default labels provided out of the box.</p></div>
<div class="paragraph"><p>A label name is any of the following:</p></div>
<div class="ulist"><ul>
<li>
<p>
The category name.  If the category name contains spaces,
  it must be wrapped in double quotes.  Example: <tt>label:"Code Review"</tt>.
</p>
</li>
<li>
<p>
The name, without spaces.  This avoids needing to use double quotes
  for the common category Code Review.  Example: <tt>label:CodeReview</tt>.
</p>
</li>
<li>
<p>
The internal short name.  Example: <tt>label:CRVW</tt>, or <tt>label:VRIF</tt>.
</p>
</li>
<li>
<p>
The one or two character abbreviation shown in the column header
  of change list pages.  Example: <tt>label:R</tt> or <tt>label:V</tt>.
</p>
</li>
</ul></div>
<div class="paragraph"><p>A label name must be followed by a score, or an operator and a score.
The easiest way to explain these are by example.</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
<tt>label:CodeReview=2</tt>
</dt>
<dt class="hdlist1">
<tt>label:CodeReview=+2</tt>
</dt>
<dt class="hdlist1">
<tt>label:CodeReview+2</tt>
</dt>
<dd>
<div class="paragraph"><p>Matches changes where there is at least one +2 score for Code Review.
The + prefix is optional for positive score values.  If the + is used,
the = operator is optional.</p></div>
</dd>
<dt class="hdlist1">
<tt>label:CodeReview=-2</tt>
</dt>
<dt class="hdlist1">
<tt>label:CodeReview-2</tt>
</dt>
<dd>
<div class="paragraph"><p>Matches changes where there is at least one -2 score for Code Review.
Because the negative sign is required, the = operator is optional.</p></div>
</dd>
<dt class="hdlist1">
<tt>label:CodeReview=1</tt>
</dt>
<dd>
<div class="paragraph"><p>Matches changes where there is at least one +1 score for Code Review.
Scores of +2 are not matched, even though they are higher.</p></div>
</dd>
<dt class="hdlist1">
<tt>label:CodeReview&gt;=1</tt>
</dt>
<dd>
<div class="paragraph"><p>Matches changes with either a +1, +2, or any higher score.</p></div>
</dd>
<dt class="hdlist1">
<tt>label:CodeReview&lt;=-1</tt>
</dt>
<dd>
<div class="paragraph"><p>Matches changes with either a -1, -2, or any lower score.</p></div>
</dd>
<dt class="hdlist1">
<tt>is:open CodeReview+2 Verified+1 -Verified-1 -CodeReview-2</tt>
</dt>
<dd>
<div class="paragraph"><p>Matches changes that are ready to be submitted.</p></div>
</dd>
<dt class="hdlist1">
<tt>is:open (Verified-1 OR CodeReview-2)</tt>
</dt>
<dd>
<div class="paragraph"><p>Changes that are blocked from submission due to a blocking score.</p></div>
</dd>
</dl></div>
</div>
<h2 id="_magical_operators">Magical Operators</h2>
<div class="sectionbody">
<div class="paragraph"><p>Most of these operators exist to support features of Gerrit Code
Review, and are not meant to be accessed by the average end-user.
However, they are recognized by the query parser, and may prove
useful in limited contexts to administrators or power-users.</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
visibleto:'USER-or-GROUP'
</dt>
<dd>
<div class="paragraph"><p>Matches changes that are visible to <em>USER</em> or to anyone who is a
member of <em>GROUP</em>.  Here group names may be specified as either
an internal group name, or if LDAP is being used, an external LDAP
group name.  The value may be wrapped in double quotes to include
spaces or other special characters.  For example, to match an LDAP
group: <tt>visibleto:"CN=Developers, DC=example, DC=com"</tt>.</p></div>
<div class="paragraph"><p>This operator may be useful to test access control rules, however a
change can only be matched if both the current user and the supplied
user or group can see it.  This is due to the implicit <em>is:visible</em>
clause that is always added by the server.</p></div>
</dd>
<dt class="hdlist1">
is:visible
</dt>
<dd>
<div class="paragraph"><p>Magical internal flag to prove the current user has access to read
the change.  This flag is always added to any query.</p></div>
</dd>
<dt class="hdlist1">
starredby:'USER'
</dt>
<dd>
<div class="paragraph"><p>Matches changes that have been starred by <em>USER</em>.</p></div>
</dd>
<dt class="hdlist1">
watchedby:'USER'
</dt>
<dd>
<div class="paragraph"><p>Matches changes that <em>USER</em> has configured watch filters for.</p></div>
</dd>
<dt class="hdlist1">
draftby:'USER'
</dt>
<dd>
<div class="paragraph"><p>Matches changes that <em>USER</em> has left unpublished drafts on.
Since the drafts are unpublished, it is not possible to see the
draft text, or even how many drafts there are.</p></div>
</dd>
<dt class="hdlist1">
limit:'CNT'
</dt>
<dd>
<div class="paragraph"><p>Limit the returned results to no more than <em>CNT</em> records.  This is
automatically set to the page size configured in the current user&#8217;s
preferences.  Including it in a web query may lead to unpredictable
results with regards to pagination.</p></div>
</dd>
<dt class="hdlist1">
resume_sortkey:'KEY'
</dt>
<dd>
<div class="paragraph"><p>Positions the low level scan routine to start from <em>KEY</em> and
continue through changes from this point.  This is most often used
for paginating result sets.  Including this in a web query may lead
to unpredictable results.</p></div>
</dd>
<dt class="hdlist1">
sortkey_after:'KEY', sortkey_before:'KEY'
</dt>
<dd>
<div class="paragraph"><p>Restart the low level scan routine from <em>KEY</em>.  This is automatically
set by the pagination system as the user navigates through results
of a query.  Including either value in a web query may lead to
unpredictable results.</p></div>
</dd>
</dl></div>
</div>
<hr style="
  height: 2px;
  color: silver;
  margin-top: 1.2em;
  margin-bottom: 0.5em;
">
<div class="paragraph"><p>Part of <a href="index.html">Gerrit Code Review</a></p></div>
</div>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
Version 2.3<br />
Last updated 2012-04-03 11:49:27 MDT
</div>
</div>
</body>
</html>
